score = input()
list = score.split(sep=" ")
max = 0
for i in list:
    if eval(i) > max:
        max = eval(i)
if list.count(str(max)) == 1:
    print(list.index(str(max)) + 1)
elif list.count(str(max)) >= 2:
    j = list.count(str(max))
    for i in range(j):
        index = list.index(str(max))
        print(index + 1, end=" ")
        list.insert(index, "-1")
        list.remove(str(max))
